<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var i =0;
        var j =0;
        document.write("<table border='1' width='400' height='400'>");
        
        while(i<4){
            document.write("<tr>");
                console.log("i值为:" +i);
            while(j<4){
                console.log("j值为:" +j);
                document.write("<td>");
                document.write("</td>");
                j++;
            }
            document.write("</tr>");
            i++;
        }
        document.write("</table>");
        
    </script>
</body>
</html>